package com.shop.cereshop.app.dl.logic.service.Impl;

import com.shop.cereshop.app.dao.dl.CereShopAnnouncementDao;
import com.shop.cereshop.app.dl.logic.domain.CereShopAnnouncement;
import com.shop.cereshop.app.dl.logic.service.CereShopAnnouncementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: 况鑫威
 * @Date: 2021/7/22
 * @Time: 16:14
 * @ClassName: CereShopAnnouncementServiceImpl
 * @Description: com.shop.cereshop.app.dl.logic.service.Impl
 */
@Service
public class CereShopAnnouncementServiceImpl implements CereShopAnnouncementService {
    @Autowired
    private CereShopAnnouncementDao cereShopAnnouncementDao;

    @Override
    public int deleteByPrimaryKey(Long announcementId) {
        return cereShopAnnouncementDao.deleteByPrimaryKey(announcementId);
    }

    @Override
    public int insert(CereShopAnnouncement record) {
        return cereShopAnnouncementDao.insert(record);
    }

    @Override
    public int insertSelective(CereShopAnnouncement record) {
        return cereShopAnnouncementDao.insertSelective(record);
    }

    @Override
    public CereShopAnnouncement selectByPrimaryKey(Long announcementId) {
        return cereShopAnnouncementDao.selectByPrimaryKey(announcementId);
    }

    @Override
    public int updateByPrimaryKeySelective(CereShopAnnouncement record) {
        return cereShopAnnouncementDao.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(CereShopAnnouncement record) {
        return cereShopAnnouncementDao.updateByPrimaryKey(record);
    }

    @Override
    public List<CereShopAnnouncement> getAnnouncements(String announcementType) {
        return cereShopAnnouncementDao.getAnnouncements(announcementType);
    }
}
